<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="4.0" encoding="iso-8859-1" indent="yes"/>

<xsl:template match="/">

	<div id="bloc_menuRh">
		<xsl:for-each select="/menu/level1[@class = 'currentinterne1']">
			<xsl:variable name="nameN1" select="@namepiwik"/>
			<xsl:for-each select="level2[not(@suppression='true') and not(@visible='false')]">
				<xsl:variable name="nameN2" select="@namepiwik"/>
				<ul>
					<li class="{@class}">
					<xsl:if test="@link">
						<a href="{@link}" onclick="javascript:_paq.push(['trackPageView', '{$nameN1}/{$nameN2}']);">
							<xsl:if test="@tools = 'true' or @target">
								<xsl:attribute name="target">_blank</xsl:attribute>
							</xsl:if>
							<xsl:value-of select="@name"/>
						</a>
					</xsl:if>
					<xsl:if test="not(@link)">
						<span><xsl:value-of select="@name"/></span>
					</xsl:if>
					</li>
					<xsl:for-each select="level3[not(@suppression='true') and not(@visible='false')]">
						<xsl:variable name="nameN3" select="@namepiwik"/>
						<li class="{@class}">
							<xsl:if test="@link">
								<a href="{@link}" onclick="javascript:_paq.push(['trackPageView', '{$nameN1}/{$nameN2}/{$nameN3}']);">
									<xsl:if test="@tools = 'true' or @target">
										<xsl:attribute name="target">_blank</xsl:attribute>
									</xsl:if>
									<xsl:value-of select="@name"/>
								</a>
							</xsl:if>
							<xsl:if test="not(@link)">
								<span><xsl:value-of select="@name"/></span>
							</xsl:if>
						</li>
					</xsl:for-each>
				</ul>
			</xsl:for-each>
		</xsl:for-each>
	</div>

</xsl:template>

</xsl:stylesheet>